function check_phone(tbl){
	if(isEmpty(tbl.phone)){
		return {code:1002,msg:"手机号不能为空"}
	}else if(!(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(tbl.phone))){ 
        return {code:1002,msg:"手机号格式不正确"}; 
    } 
	var count=dao.count("users",Cnd.where("phone","=",tbl.phone))
	if(count==0){
		return {code:200,msg:"success"}
	}else{
		return {code:1001,msg:"手机号已存在!"}
	}
}
function check_username(tbl){
	if(isEmpty(tbl.username)){
		return {code:1002,msg:"用戶名不能为空!"}
	}else if(tbl.username.length<6&&tbl.username.length<20){ 
        return {code:1002,msg:"用戶名格式不正确!"}; 
    } 
	var count=dao.count("users",Cnd.where("username","=",tbl.username))
	if(count==0){
		return {code:200,msg:"success"}
	}else{
		return {code:1001,msg:"用户名已存在!"}
	}
}
function check_namephone(tbl){
	if(isEmpty(tbl.phone)){
		return {code:1002,msg:"手机号不能为空!"}
	}else if(!(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(tbl.phone))){ 
        return {code:1002,msg:"手机号格式不正确"}; 
    } 
	var count=dao.count("users",Cnd.where("phone","=",tbl.phone))
	if(count>0){
		return {code:200,msg:"success"}
	}else{
		return {code:1001,msg:"手机号不存在!"}
	}
}